package bocchi.card;

import bocchi.base.BaseCustomCard;
import bocchi.BocchiCore;
import com.evacipated.cardcrawl.mod.stslib.actions.common.FetchAction;
import com.evacipated.cardcrawl.mod.stslib.actions.common.SelectCardsAction;
import com.megacrit.cardcrawl.actions.unique.AttackFromDeckToHandAction;
import com.megacrit.cardcrawl.actions.unique.SkillFromDeckToHandAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class KessokuBand extends BaseCustomCard {
    private static final String RAW_ID = KessokuBand.class.getSimpleName();
	public static final String GAME_ID = BocchiCore.getGameID(RAW_ID);

    public KessokuBand() {
        super(RAW_ID);
    }

    @Override
    public void use(AbstractPlayer player, AbstractMonster monster) {
        addToBot(new SkillFromDeckToHandAction(1));
        addToBot(new AttackFromDeckToHandAction(1));

        SelectCardsAction selectPower = new SelectCardsAction(
                player.drawPile.group,
                "选择一张能力牌放入你的手牌",
                card -> card.type == CardType.POWER,
                cards -> {
                    addToBot(new FetchAction(
                            player.drawPile,
                            card -> (boolean) cards.contains(card)
                    ));
                }
        );

        addToBot(selectPower);
    }
}
